ABC312 B - TaK Code
https://atcoder.jp/contests/abc312/tasks/abc312_b
提出
code: python
n, m = map(int, input().split())
c =
list(input()) for _ in range(n)
for i in range(n):
for j in range(m):
if i + 9 > n:
continue
if j + 9 > m:
continue
if c
i
j
== "#" and c
i
j+1
== "#" and c
i
j+2
== "#" and c
i
j+3
== "." and c
i+1
j
== "#" and c
i+1
j+1
== "#" and c
i+1
j+2
== "#" and c
i+1
j+3
== "." and c
i+2
j
== "#" and c
i+2
j+1
== "#" and c
i+2
j+2
== "#" and c
i+2
j+3
== "." and c
i+3
j
== "." and c
i+3
j+1
== "." and c
i+3
j+2
== "." and c
i+3
j+3
== "." and c
i+5
j+5
== "." and c
i+5
j+6
== "." and c
i+5
j+7
== "." and c
i+5
j+8
== "." and c
i+6
j+5
== "." and c
i+6
j+6
== "#" and c
i+6
j+7
== "#" and c
i+6
j+8
== "#" and c
i+7
j+5
== "." and c
i+7
j+6
== "#" and c
i+7
j+7
== "#" and c
i+7
j+8
== "#" and c
i+8
j+5
== "." and c
i+8
j+6
== "#" and c
i+8
j+7
== "#" and c
i+8
j+8
== "#":
print(i+1, j+1)